<?php
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\LinkPager;
?>
<center>
	<table border="2">
<tr>
   	<td>编号</td>
   	<td>名称</td>
   	<td>价格</td>
   	<td>库存</td>
   	<td>状态</td>
   	<td>图片</td>
   	<td>操作</td>
 </tr>
<?php

foreach ($models as $key => $value) {?>
   <tr style="align-items: center">
   	<td><?php echo $value['id']?></td>
   	<td><?php echo $value['name']?></td>
   	<td><?php echo $value['price']?></td>
   	<td><?php echo $value['stock']?></td>
   	<td><?php echo $value['status']?></td>
   	<td><img src="<?php echo $value['path']?>" alt="" height="50" width="50"></td>
   	<td><a href="<?php echo Url::toRoute(['good/del','id'=>$value['id']]);?>">删除</a>||<a href="<?php echo Url::to(['good/saves', 'id' => $value['id']]);?>">修改</a></td>
   </tr>
<?php } ?></table>
<?php echo LinkPager::widget([
    'pagination' => $pages,
]);?>

</center>